A computer program is typically composed of components that may invoke other components of the program. A program component can be associated with an interface that identifies the component and defines how the component is invoked and how and what kind of values can be passed to and from the component.
When the language used to write the program is a typed language, the interface can declare or imply one or more types for each value that can be sent to the program component. Types can be used by a type checker to make sure that passed values are of the correct type. Type checking can happen at compile time (static type checking) or at runtime (dynamic type checking). Static type checking is able to verify that the type checked conditions hold for all possible executions of the program. Dynamic type checking is performed at runtime. Dynamic type checking is only able to verify that a particular execution of a program is error-free so dynamic type checking has to be performed each time the program is run.